/********************************************************************************
 *      Copyright:  (C) 2022 Zhang Changxing<ZhangChangxingVIP@163.com>
 *                  All rights reserved.
 *
 *       Filename:  socket.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(04/14/2022)
 *         Author:  Zhang Changxing <ZhangChangxingVIP@163.com>
 *      ChangeLog:  1, Release initial version on "04/14/2022 09:38:40 PM"
 *                 
 ********************************************************************************/

#ifndef  _SOCKET_H_
#define  _SOCKET_H_

#include "main.h"

/*
 *   description:   Initialize the socket to connect to the client
 *          args:
 *                  $listen_ip:     IP address of the server
 *                  $port:          Listening port
 *  return value:   <0: failure,    =0:ok 
 */
int socket_init(char *listen_ip, int port);

/*
 *   description:   Set the maximum number of files that can be opened
 */
void set_socket_rimit(void);

#endif   /* ----- #ifndef _SOCKET_H_  ----- */

